#include"pro_management.h"

using namespace std;

//构造函数
pro_management::pro_management()
{
    //1.文件不存在
    ifstream ifs;
    ifs.open(FILE_PRO_MAN, ios::in);//读文件
    if (!ifs.is_open())//返回值是bool型
    {
        //cout << "文件不存在" << endl;
        //初始化文件是否为空
        m_FileIsEmpty = true;
        ifs.close();
        return;
    }
   //文件存在，但数据为空
    char ch;
    ifs >> ch;
    //文件指针到最后一个字符时并不会触发eof,再读一次读不到数据才触发eof,
    if(ifs.eof())
    {
        //cout << "文件为空" << endl;
        m_FileIsEmpty = true;
        //ifs.close();
        return;
    }
    ifs.close();
    ifs.open(FILE_PRO_MAN, ios::in);//读文件
    //读取文件中的数据
    ifs >> management.username
    >> management.name
    >> management.ID
    >> management.bio
    >> management.mail_box
    >> management.school
    >> management.birthday.year
    >> management.birthday.month
    >> management.birthday.day
    >> management.area
    >> management.sex
    >> management.likes;
//    >> management.following
//    >> management.followers
//    >> management.friends
//    >> management.interest;
    ifs.close();
    //更新职工不为空标志
    m_FileIsEmpty = false;
}

//保存文件
void pro_management::save()
{
    ofstream ofs;
    ofs.open(FILE_PRO_MAN, ios::out);//用输出的方式打开文件 -- 写文件
    ofs << management.username << endl
    << management.name << endl
    << management.ID << endl
    << management.bio << endl
    << management.mail_box << endl
    << management.school << endl
    << management.birthday.year<< endl
    << management.birthday.month << endl
    << management.birthday.day << endl
    << management.area << endl
    << management.sex << endl
    << management.likes << endl;
//    << management.following << endl
//    << management.followers << endl
//    << management.friends << endl
//    << management.interest << endl;
    ofs.close();
}
//析构函数
pro_management::~pro_management()
{

}
//退出函数
//void pro_management::Exit()
//{
//    cout << "欢迎下次使用！\n";
//    exit(0);
//}
//添加
void pro_management::Insert()
{
    if(m_FileIsEmpty == true)
    {
        pro & shor = short_time;
        cout << "请输入博主的昵称: ";
        cin >> short_time.username;
        cout << "请输入博主的真实姓名：";
        cin >> short_time.name;
        cout << "请输入博主的抖音号: ";
        cin >> short_time.ID;
        cout << "请输入博主的个人简介: " ;
        cin >> short_time.bio;
        cout << "请输入博主的邮箱: " ;
        cin >> short_time.mail_box;
        cout << "请输入博主的学校: " ;
        cin >> short_time.school;
        //录入生日
        set_bir(shor);
//        shor.birthday.year = short_time.birthday.year;
//        shor.birthday.month = short_time.birthday.month;
//        shor.birthday.day = short_time.birthday.day;
//        cout << short_time.birthday.year;
//        cout <<  short_time.birthday.year;
//        cout << short_time.birthday.year;
        //添加地区
        set_area(shor);
        
        //录入性别
        set_sex(shor);
//        shor.sex = short_time.sex;
        cout << "请输入博主的总获赞数:" ;
        cin >> short_time.likes;
        management = short_time;
        cout << "添加成功！" << endl;
        //保存数据到文件中
        save();
        m_FileIsEmpty = false;
    }
    else
    {
        cout << "已经存在用户，无法重复添加！" << endl;
        cout << "按任意键继续！" << endl;
        char ch;
        cin >> ch;
    }
  
}
//显示
void pro_management::show_info()
{
    if(m_FileIsEmpty == false)
    {
        cout << "昵称：" << management.username << endl;
        cout << "真实姓名：" << management.name << endl;
        cout << "抖音号：" << management.ID << endl;
        cout << "邮箱：" << management.mail_box << endl;
        cout << "学校：" << management.school << endl;
        cout << "性别：" << management.sex << endl;
        cout << "生日：" << management.birthday.year << "/"
             << management.birthday.month << "/"
             << management.birthday.day << endl;
        cout << "地区：" << management.area << endl;
        cout << "总点赞数：" << management.likes << endl;
        cout << "关注数：" << address().fol_num << endl;
        cout << "粉丝数：" << address().fan_num << endl;
        cout << "喜欢数：" << address().wor_num << endl;
        cout << "个人简介：" << management.bio << endl;
        cout << "\n\n";
    }
    else
    {
        cout << "用户不存在！" << endl;
    }
}
//删除
void pro_management::Remove()
{
    if(m_FileIsEmpty == false)
    {
        while(1)
        {
            cout << "亲爱的" << management.username << "，您确定要删除您的个人账户吗？" << endl;
            cout << "1.Yes" << endl;
            cout << "2.No" << endl;
            int choose;
            cin >> choose;
            if(choose == 1)
            {
                //打开模式 ios::trunc 如果存在，则删除文件并重新创建
                ofstream ofs(FILE_PRO_MAN, ios::trunc);
                ofs.close();
                //更改文件判断标志
                m_FileIsEmpty = true;
                cout << "清除成功！" << endl;
                break;
            }
            else if(choose == 2)
            {
                break;
            }
            else
            {
                cout << "输入有误，请重新输入！" << endl;
                cout << "按任意键继续！" << endl;
                char ch;
                cin >> ch;
            }
        }
    }
    else
    {
        cout << "用户不存在，无法删除！" << endl;
        cout << "按任意键继续！" << endl;
        char ch;
        cin >> ch;
    }
}
//修改个人信息
void pro_management::Modify()
{
    if(m_FileIsEmpty == false)
    {
        while(1)
        {
            bool mod_flag = true;
            cout << "请选择要修改的部分：" << endl;
            cout << "0.返回上一级菜单" << endl;
            cout << "1.昵称：" << endl;
            cout << "2.真实姓名：" << endl;
            cout << "3.地区：" << endl;
            cout << "4.邮箱：" << endl;
            cout << "5.学校：" << endl;
            cout << "6.生日：" << endl;
            cout << "7.性别：" << endl;
            cout << "8.个人简介：" << endl;
            int select;
            cin >> select;
            pro & shor = short_time;
            switch (select)
            {
                case 0:
                    return;
                case 1:
                    cout << "请输入博主的昵称:" << endl;
                    cin >> short_time.username;
                    management.username = short_time.username;
                    break;
                case 2:
                    cout << "请输入博主真实姓名：" << endl;
                    cin >> short_time.name;
                    management.name = short_time.name;
                    break;
                case 3:
                    //录入地区
                    
                    set_area(shor);
                    management.area = shor.area;
                    break;
                case 4:
                    cout << "请输入博主的邮箱：" << endl;
                    cin >> short_time.mail_box;
                    management.mail_box = short_time.mail_box;
                    break;
                case 5:
                    cout << "请输入博主的学校：" << endl;
                    cin >> short_time.school;
                    management.school = short_time.school;
                    break;
                    
                case 6:
                    //录入生日
                    set_bir(shor);
                    management.birthday = shor.birthday;
                    break;
                case 7:
                    //录入性别
                    set_sex(shor);
                    management.sex = shor.sex;
                    break;
                case 8:
                    cout << "请输入博主的个人简介：" << endl;
                    cin >> short_time.bio;
                    break;
                default:
                    cout << "您的输入有误，请重新输入！" << endl;
                    cout << "按任意键继续！" << endl;
                    char ch;
                    cin >> ch;
                    mod_flag = false;
                    break;
            }
            if(mod_flag == true)
            {
                break;
            }
        }
        cout << "修改成功！" << endl;
        save();
    }
    else
    {
        cout << "用户不存在，无法修改！" << endl;
        cout << "按任意键继续！" << endl;
        char ch;
        cin >> ch;
    }
    
}
//地区录入
void pro_management::set_area(pro & shor)
{
    while (1)
    {
        cout << "请输入博主的地区" << endl;
        cout << "1.河北" << endl;
        cout << "2.山西" << endl;
        cout << "3.辽宁" << endl;
        cout << "4.吉林" << endl;
        cout << "5.黑龙江" << endl;
        cout << "6.江苏" << endl;
        cout << "7.浙江" << endl;
        cout << "8.安徽" << endl;
        cout << "9.福建" << endl;
        cout << "10.江西" << endl;
        cout << "11.山东" << endl;
        cout << "12.河南" << endl;
        cout << "13.湖北" << endl;
        cout << "14.湖南" << endl;
        cout << "15.广东" << endl;
        cout << "16.海南" << endl;
        cout << "17.四川" << endl;
        cout << "18.贵州" << endl;
        cout << "19.云南" << endl;
        cout << "20.陕西" << endl;
        cout << "21.甘肃" << endl;
        cout << "22.青海" << endl;
        cout << "23.北京" << endl;
        cout << "24.天津" << endl;
        cout << "25.上海" << endl;
        cout << "26.重庆" << endl;
        cout << "27.内蒙古自治区" << endl;
        cout << "28.新疆维吾尔自治区" << endl;
        cout << "29.广西壮族自治区" << endl;
        cout << "30.西藏自治区" << endl;
        cout << "31.宁夏回族自治区" << endl;
        cout << "32.香港特别行政区" << endl;
        cout << "33.澳门特别行政区" << endl;
        cout << "34.台湾" << endl;
        int choose;
        cin >> choose;
        //作为第一级菜单是否返回的标志
        bool flag = true;
        //作为第二级菜单是否返回的标志
        bool sub_flag = true;
        //作为第二级菜单switch语句的expression成分
        int choice;
        switch (choose)
        {
            case 1:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.石家庄市" << endl;
                    cout << "2.唐山市" << endl;
                    cout << "3.秦皇岛市" << endl;
                    cout << "4.邯郸市" << endl;
                    cout << "5.邢台市" << endl;
                    cout << "6.保定市" << endl;
                    cout << "7.张家口市" << endl;
                    cout << "8.承德市" << endl;
                    cout << "9.沧州市" << endl;
                    cout << "10.廊坊市" << endl;
                    cout << "11.衡水市" << endl;
                    cout << "12.辛集市" << endl;
                    cout << "13.定州市" << endl;
                    cout << "14.雄安新区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                        case 1:
                            shor.area = "石家庄市";
                            break;
                        case 2:
                            shor.area = "唐山市";
                            break;
                        case 3:
                            shor.area = "秦皇岛市";
                            break;
                        case 4:
                            shor.area = "邯郸市";
                            break;
                        case 5:
                            shor.area = "邢台市";
                            break;
                        case 6:
                            shor.area = "保定市";
                            break;
                        case 7:
                            shor.area = "张家口市";
                            break;
                        case 8:
                            shor.area = "承德市";
                            break;
                        case 9:
                            shor.area = "沧州市";
                            break;
                        case 10:
                            shor.area = "廊坊市";
                            break;
                        case 11:
                            shor.area = "衡水市";
                            break;
                        case 12:
                            shor.area = "辛集市";
                            break;
                        case 13:
                            shor.area = "定安市";
                            break;
                        case 14:
                            shor.area = "雄安新区";
                            break;
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                break;
            }
            case 2:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.太原市" << endl;
                    cout << "2.大同市" << endl;
                    cout << "3.阳泉市" << endl;
                    cout << "4.长治市" << endl;
                    cout << "5.晋城市" << endl;
                    cout << "6.朔州市" << endl;
                    cout << "7.晋中市" << endl;
                    cout << "8.运城市" << endl;
                    cout << "9.忻州市" << endl;
                    cout << "10.临汾市" << endl;
                    cout << "11.吕梁市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                        case 1:
                            shor.area = "太原市";
                            break;
                        case 2:
                            shor.area = "大同市";
                            break;
                        case 3:
                            shor.area = "阳泉市";
                            break;
                        case 4:
                            shor.area = "长治市";
                            break;
                        case 5:
                            shor.area = "晋城市";
                            break;
                        case 6:
                            shor.area = "朔州市";
                            break;
                        case 7:
                            shor.area = "晋中市";
                            break;
                        case 8:
                            shor.area = "运城市";
                            break;
                        case 9:
                            shor.area = "忻州市";
                            break;
                        case 10:
                            shor.area = "临汾市";
                            break;
                        case 11:
                            shor.area = "吕梁市";
                            break;
        
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 3:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.沈阳市" << endl;
                    cout << "2.大连市" << endl;
                    cout << "3.鞍山市" << endl;
                    cout << "4.抚顺市" << endl;
                    cout << "5.本溪市" << endl;
                    cout << "6.丹东市" << endl;
                    cout << "7.锦州市" << endl;
                    cout << "8.营口市" << endl;
                    cout << "9.阜新市" << endl;
                    cout << "10.盘锦市" << endl;
                    cout << "11.铁岭市" << endl;
                    cout << "12.朝阳市" << endl;
                    cout << "13.葫芦岛市" << endl;
                    cout << "14.沈抚改革创新示范区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "沈阳市";
                            break;
                        case 2:
                            shor.area = "大连市";
                            break;
                        case 3:
                            shor.area = "鞍山市";
                            break;
                        case 4:
                            shor.area = "抚顺市";
                            break;
                        case 5:
                            shor.area = "本溪市";
                            break;
                        case 6:
                            shor.area = "丹东市";
                            break;
                        case 7:
                            shor.area = "锦州市";
                            break;
                        case 8:
                            shor.area = "营口市";
                            break;
                        case 9:
                            shor.area = "阜新市";
                            break;
                        case 10:
                            shor.area = "盘锦市";
                            break;
                        case 11:
                            shor.area = "铁岭市";
                            break;
                        case 12:
                            shor.area = "朝阳市";
                            break;
                        case 13:
                            shor.area = "葫芦岛市";
                            break;
                        case 14:
                            shor.area = "沈抚改革创新示范区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 4:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.长春市" << endl;
                    cout << "2.吉林市" << endl;
                    cout << "3.四平市" << endl;
                    cout << "4.辽源市" << endl;
                    cout << "5.通化市" << endl;
                    cout << "6.白山市" << endl;
                    cout << "7.松原市" << endl;
                    cout << "8.白城市" << endl;
                    cout << "9.延边州" << endl;
                    cout << "10.长白山管委会" << endl;
                    cout << "11.梅河口市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "长春市";
                            break;
                        case 2:
                            shor.area = "吉林市";
                            break;
                        case 3:
                            shor.area = "四平市";
                            break;
                        case 4:
                            shor.area = "辽源市";
                            break;
                        case 5:
                            shor.area = "通化市";
                            break;
                        case 6:
                            shor.area = "白山市";
                            break;
                        case 7:
                            shor.area = "松原市";
                            break;
                        case 8:
                            shor.area = "白城市";
                            break;
                        case 9:
                            shor.area = "延边州";
                            break;
                        case 10:
                            shor.area = "长白山管委会";
                            break;
                        case 11:
                            shor.area = "梅河口市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 5:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.哈尔滨市" << endl;
                    cout << "2.齐齐哈尔市" << endl;
                    cout << "3.牡丹江市" << endl;
                    cout << "4.佳木斯市" << endl;
                    cout << "5.大庆市" << endl;
                    cout << "6.鸡西市" << endl;
                    cout << "7.双鸭山市" << endl;
                    cout << "8.伊春市" << endl;
                    cout << "9.七台河市" << endl;
                    cout << "10.鹤岗市" << endl;
                    cout << "11.绥化市" << endl;
                    cout << "12.黑河市" << endl;
                    cout << "13.大兴安岭地区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "哈尔滨市";
                            break;
                        case 2:
                            shor.area = "齐齐哈尔市";
                            break;
                        case 3:
                            shor.area = "牡丹江市";
                            break;
                        case 4:
                            shor.area = "佳木斯市";
                            break;
                        case 5:
                            shor.area = "大庆市";
                            break;
                        case 6:
                            shor.area = "鸡西市";
                            break;
                        case 7:
                            shor.area = "双鸭山市";
                            break;
                        case 8:
                            shor.area = "伊春市";
                            break;
                        case 9:
                            shor.area = "七台河市";
                            break;
                        case 10:
                            shor.area = "鹤岗市";
                            break;
                        case 11:
                            shor.area = "绥化市";
                            break;
                        case 12:
                            shor.area = "黑河市";
                            break;
                        case 13:
                            shor.area = "大兴安岭地区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }

            case 6:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.南京市" << endl;
                    cout << "2.无锡市" << endl;
                    cout << "3.徐州市" << endl;
                    cout << "4.常州市" << endl;
                    cout << "5.苏州市" << endl;
                    cout << "6.南通市" << endl;
                    cout << "7.连云港市" << endl;
                    cout << "8.淮安市" << endl;
                    cout << "9.盐城市" << endl;
                    cout << "10.扬州市" << endl;
                    cout << "11.镇江市" << endl;
                    cout << "12.泰州市" << endl;
                    cout << "13.宿迁市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "南京市";
                            break;
                        case 2:
                            shor.area = "无锡市";
                            break;
                        case 3:
                            shor.area = "徐州市";
                            break;
                        case 4:
                            shor.area = "常州市";
                            break;
                        case 5:
                            shor.area = "苏州市";
                            break;
                        case 6:
                            shor.area = "南通市";
                            break;
                        case 7:
                            shor.area = "连云港市";
                            break;
                        case 8:
                            shor.area = "淮安市";
                            break;
                        case 9:
                            shor.area = "盐城市";
                            break;
                        case 10:
                            shor.area = "扬州市";
                            break;
                        case 11:
                            shor.area = "镇江市";
                            break;
                        case 12:
                            shor.area = "泰州市";
                            break;
                        case 13:
                            shor.area = "宿迁市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }

            case 7:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.杭州市" << endl;
                    cout << "2.嘉兴市" << endl;
                    cout << "3.绍兴市" << endl;
                    cout << "4.台州市" << endl;
                    cout << "5.丽水市" << endl;
                    cout << "6.宁波市" << endl;
                    cout << "7.温州市" << endl;
                    cout << "8.湖州市" << endl;
                    cout << "9.金华市" << endl;
                    cout << "10.舟山市" << endl;
                    cout << "11.衢州市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "杭州市";
                            break;
                        case 2:
                            shor.area = "嘉兴市";
                            break;
                        case 3:
                            shor.area = "绍兴市";
                            break;
                        case 4:
                            shor.area = "台州市";
                            break;
                        case 5:
                            shor.area = "丽水市";
                            break;
                        case 6:
                            shor.area = "宁波市";
                            break;
                        case 7:
                            shor.area = "温州市";
                            break;
                        case 8:
                            shor.area = "湖州市";
                            break;
                        case 9:
                            shor.area = "金华市";
                            break;
                        case 10:
                            shor.area = "舟山市";
                            break;
                        case 11:
                            shor.area = "衢州市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 8:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.合肥" << endl;
                    cout << "2.滁州市" << endl;
                    cout << "3.阜阳市" << endl;
                    cout << "4.宿州市" << endl;
                    cout << "5.六安市" << endl;
                    cout << "6.毫州市" << endl;
                    cout << "7.池州市" << endl;
                    cout << "8.宣城市" << endl;
                    cout << "9.芜湖市" << endl;
                    cout << "10.蚌埠市" << endl;
                    cout << "11.淮安市" << endl;
                    cout << "12.马鞍山市" << endl;
                    cout << "13.淮北市" << endl;
                    cout << "14.铜陵市" << endl;
                    cout << "15.安庆市" << endl;
                    cout << "16.黄山市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "合肥";
                            break;
                        case 2:
                            shor.area = "滁州市";
                            break;
                        case 3:
                            shor.area = "阜阳市";
                            break;
                        case 4:
                            shor.area = "宿州市";
                            break;
                        case 5:
                            shor.area = "六安市";
                            break;
                        case 6:
                            shor.area = "毫州市";
                            break;
                        case 7:
                            shor.area = "池州市";
                            break;
                        case 8:
                            shor.area = "宣城市";
                            break;
                        case 9:
                            shor.area = "芜湖市";
                            break;
                        case 10:
                            shor.area = "蚌埠市";
                            break;
                        case 11:
                            shor.area = "淮安市";
                            break;
                        case 12:
                            shor.area = "马鞍山市";
                            break;
                        case 13:
                            shor.area = "淮北市";
                            break;
                        case 14:
                            shor.area = "铜陵市";
                            break;
                        case 15:
                            shor.area = "安庆市";
                            break;
                        case 16:
                            shor.area = "黄山市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 9:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.福州市" << endl;
                    cout << "2.厦门市" << endl;
                    cout << "3.莆田市" << endl;
                    cout << "4.三明市" << endl;
                    cout << "5.泉州市" << endl;
                    cout << "6.漳州市" << endl;
                    cout << "7.南平市" << endl;
                    cout << "8.龙岩市" << endl;
                    cout << "9.宁德市" << endl;
                    cout << "10.平潭综合实验区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "福州市";
                            break;
                        case 2:
                            shor.area = "厦门市";
                            break;
                        case 3:
                            shor.area = "莆田市";
                            break;
                        case 4:
                            shor.area = "三明市";
                            break;
                        case 5:
                            shor.area = "泉州市";
                            break;
                        case 6:
                            shor.area = "漳州市";
                            break;
                        case 7:
                            shor.area = "南平市";
                            break;
                        case 8:
                            shor.area = "龙岩市";
                            break;
                        case 9:
                            shor.area = "宁德市";
                            break;
                        case 10:
                            shor.area = "平潭综合实验区";
                    
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 10:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.南昌市" << endl;
                    cout << "2.赣州市" << endl;
                    cout << "3.景德镇市" << endl;
                    cout << "4.萍乡市" << endl;
                    cout << "5.九江市" << endl;
                    cout << "6.新余市" << endl;
                    cout << "7.鹰潭市" << endl;
                    cout << "8.吉安市" << endl;
                    cout << "9.宜春市" << endl;
                    cout << "10.抚州市" << endl;
                    cout << "11.上饶市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "南昌市";
                            break;
                        case 2:
                            shor.area = "赣州市";
                            break;
                        case 3:
                            shor.area = "景德镇市";
                            break;
                        case 4:
                            shor.area = "萍乡市";
                            break;
                        case 5:
                            shor.area = "九江市";
                            break;
                        case 6:
                            shor.area = "新余市";
                            break;
                        case 7:
                            shor.area = "鹰潭市";
                            break;
                        case 8:
                            shor.area = "吉安市";
                            break;
                        case 9:
                            shor.area = "宜春市";
                            break;
                        case 10:
                            shor.area = "抚州市";
                            break;
                        case 11:
                            shor.area = "上饶市";
                            break;
                        
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 11:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.济南市" << endl;
                    cout << "2.青岛市" << endl;
                    cout << "3.淄博市" << endl;
                    cout << "4.枣庄市" << endl;
                    cout << "5.东营市" << endl;
                    cout << "6.烟台市" << endl;
                    cout << "7.淮坊市" << endl;
                    cout << "8.济宁市" << endl;
                    cout << "9.泰安市" << endl;
                    cout << "10.威海市" << endl;
                    cout << "11.日照市" << endl;
                    cout << "12.临沂市" << endl;
                    cout << "13.德州市" << endl;
                    cout << "14.滨州市" << endl;
                    cout << "15.菏泽市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "济南市";
                            break;
                        case 2:
                            shor.area = "青岛市";
                            break;
                        case 3:
                            shor.area = "淄博市";
                            break;
                        case 4:
                            shor.area = "枣庄市";
                            break;
                        case 5:
                            shor.area = "东营市";
                            break;
                        case 6:
                            shor.area = "烟台市";
                            break;
                        case 7:
                            shor.area = "淮坊市";
                            break;
                        case 8:
                            shor.area = "济宁市";
                            break;
                        case 9:
                            shor.area = "泰安市";
                            break;
                        case 10:
                            shor.area = "威海市";
                            break;
                        case 11:
                            shor.area = "日照市";
                            break;
                        case 12:
                            shor.area = "临沂市";
                            break;
                        case 13:
                            shor.area = "德州市";
                            break;
                        case 14:
                            shor.area = "滨州市";
                            break;
                        case 15:
                            shor.area = "菏泽市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 12:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1." << endl;
                    cout << "2.开封市" << endl;
                    cout << "3.洛阳市" << endl;
                    cout << "4.平顶山市" << endl;
                    cout << "5.安阳市" << endl;
                    cout << "6.鹤壁市" << endl;
                    cout << "7.新乡市" << endl;
                    cout << "8.焦作市" << endl;
                    cout << "9.濮阳市" << endl;
                    cout << "10.许昌市" << endl;
                    cout << "11.漯河市" << endl;
                    cout << "12.三门峡市" << endl;
                    cout << "13.南阳市" << endl;
                    cout << "14.商丘市" << endl;
                    cout << "15.信阳市" << endl;
                    cout << "16.驻马店市" << endl;
                    cout << "17.济源示范区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                        case 1:
                            shor.area = "郑州市";
                            break;
                        case 2:
                            shor.area = "开封市";
                            break;
                        case 3:
                            shor.area = "洛阳市";
                            break;
                        case 4:
                            shor.area = "平顶山市";
                            break;
                        case 5:
                            shor.area = "安阳市";
                            break;
                        case 6:
                            shor.area = "鹤壁市";
                            break;
                        case 7:
                            shor.area = "新乡市";
                            break;
                        case 8:
                            shor.area = "焦作市";
                            break;
                        case 9:
                            shor.area = "濮阳市";
                            break;
                        case 10:
                            shor.area = "许昌市";
                            break;
                        case 11:
                            shor.area = "漯河市";
                            break;
                        case 12:
                            shor.area = "三门峡市";
                            break;
                        case 13:
                            shor.area = "南阳市";
                            break;
                        case 14:
                            shor.area = "商丘市";
                            break;
                        case 15:
                            shor.area = "信阳市";
                            break;
                        case 16:
                            shor.area = "驻马店市";
                            break;
                        case 17:
                            shor.area = "济源示范区";
                            break;
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 13:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.武汉市" << endl;
                    cout << "2.黄石市" << endl;
                    cout << "3.十堰市" << endl;
                    cout << "4.仙桃市" << endl;
                    cout << "5.潜江市" << endl;
                    cout << "6.宜昌市" << endl;
                    cout << "7.天门市" << endl;
                    cout << "8.襄阳市" << endl;
                    cout << "9.鄂州市" << endl;
                    cout << "10.荆门市" << endl;
                    cout << "11.黄冈市" << endl;
                    cout << "12.咸宁市" << endl;
                    cout << "13.随州市" << endl;
                    cout << "14.神农架林区" << endl;
                    cout << "15.恩施州" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "武汉市";
                            break;
                        case 2:
                            shor.area = "黄石市";
                            break;
                        case 3:
                            shor.area = "十堰市";
                            break;
                        case 4:
                            shor.area = "仙桃市";
                            break;
                        case 5:
                            shor.area = "潜江市";
                            break;
                        case 6:
                            shor.area = "宜昌市";
                            break;
                        case 7:
                            shor.area = "天门市";
                            break;
                        case 8:
                            shor.area = "襄阳市";
                            break;
                        case 9:
                            shor.area = "荆门市";
                            break;
                        case 10:
                            shor.area = "荆门市";
                            break;
                        case 11:
                            shor.area = "黄冈市";
                            break;
                        case 12:
                            shor.area = "咸宁市";
                            break;
                        case 13:
                            shor.area = "随州市";
                            break;
                        case 14:
                            shor.area = "神农架林区";
                            break;
                        case 15:
                            shor.area = "恩施州";
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 14:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.长沙市" << endl;
                    cout << "2.株洲市" << endl;
                    cout << "3.湘潭市" << endl;
                    cout << "4.衡阳市" << endl;
                    cout << "5.邵阳市" << endl;
                    cout << "6.岳阳市" << endl;
                    cout << "7.常德市" << endl;
                    cout << "8.张家界市" << endl;
                    cout << "9.益阳市" << endl;
                    cout << "10.郴州市" << endl;
                    cout << "11.永州市" << endl;
                    cout << "12.怀化市" << endl;
                    cout << "13.娄底市" << endl;
                    cout << "14.湘西土家苗族自治州" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "长沙市";
                            break;
                        case 2:
                            shor.area = "株洲市";
                            break;
                        case 3:
                            shor.area = "湘潭市";
                            break;
                        case 4:
                            shor.area = "衡阳市";
                            break;
                        case 5:
                            shor.area = "邵阳市";
                            break;
                        case 6:
                            shor.area = "岳阳市";
                            break;
                        case 7:
                            shor.area = "常德市";
                            break;
                        case 8:
                            shor.area = "张家界市";
                            break;
                        case 9:
                            shor.area = "益阳市";
                            break;
                        case 10:
                            shor.area = "郴州市";
                            break;
                        case 11:
                            shor.area = "永州市";
                            break;
                        case 12:
                            shor.area = "怀化市";
                            break;
                        case 13:
                            shor.area = "娄底市";
                            break;
                        case 14:
                            shor.area = "湘西土家苗族自治州";
                            break;
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 15:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.广州市" << endl;
                    cout << "2.深圳市" << endl;
                    cout << "3.珠海市" << endl;
                    cout << "4.汕头市" << endl;
                    cout << "5.佛山市" << endl;
                    cout << "6.韶关市" << endl;
                    cout << "7.河源市" << endl;
                    cout << "8.梅州市" << endl;
                    cout << "9.惠州市" << endl;
                    cout << "10.汕尾市" << endl;
                    cout << "11.东莞市" << endl;
                    cout << "12.中山市" << endl;
                    cout << "13.江门市" << endl;
                    cout << "14.阳江市" << endl;
                    cout << "15.湛江市" << endl;
                    cout << "16.茂名市" << endl;
                    cout << "17.肇庆市" << endl;
                    cout << "18.清远市" << endl;
                    cout << "19.潮州市" << endl;
                    cout << "20.揭阳市" << endl;
                    cout << "21.云浮市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                        case 1:
                            shor.area = "广州市";
                            break;
                        case 2:
                            shor.area = "深圳市";
                            break;
                        case 3:
                            shor.area = "珠海市";
                            break;
                        case 4:
                            shor.area = "汕头市";
                            break;
                        case 5:
                            shor.area = "佛山市";
                            break;
                        case 6:
                            shor.area = "韶关市";
                            break;
                        case 7:
                            shor.area = "河源市";
                            break;
                        case 8:
                            shor.area = "梅州市";
                            break;
                        case 9:
                            shor.area = "惠州市";
                            break;
                        case 10:
                            shor.area = "汕尾市";
                            break;
                        case 11:
                            shor.area = "东莞市";
                            break;
                        case 12:
                            shor.area = "中山市";
                            break;
                        case 13:
                            shor.area = "江门市";
                            break;
                        case 14:
                            shor.area = "阳江市";
                            break;
                        case 15:
                            shor.area = "湛江市";
                            break;
                        case 16:
                            shor.area = "茂名市";
                            break;
                        case 17:
                            shor.area = "肇庆市";
                            break;
                        case 18:
                            shor.area = "清远市";
                            break;
                        case 19:
                            shor.area = "潮州市";
                            break;
                        case 20:
                            shor.area = "揭阳市";
                            break;
                        case 21:
                            shor.area = "云浮市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 16:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.海口市" << endl;
                    cout << "2.三亚市" << endl;
                    cout << "3.三沙市" << endl;
                    cout << "4.儋州市" << endl;
                    cout << "5.五指山市" << endl;
                    cout << "6.琼海市" << endl;
                    cout << "7.文昌市" << endl;
                    cout << "8.万宁市" << endl;
                    cout << "9.东方市" << endl;
                    cout << "10.定安县" << endl;
                    cout << "11.屯昌县" << endl;
                    cout << "12.澄迈县" << endl;
                    cout << "13.临高县" << endl;
                    cout << "14.白沙黎族自治县" << endl;
                    cout << "15.昌江黎族自治县" << endl;
                    cout << "16.东乐黎族自治县" << endl;
                    cout << "17.陵水黎族自治县" << endl;
                    cout << "18.保亭黎族苗族自治县" << endl;
                    cout << "19.琼中黎族苗族自治县" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "海口市";
                            break;
                        case 2:
                            shor.area = "三亚市";
                            break;
                        case 3:
                            shor.area = "三沙市";
                            break;
                        case 4:
                            shor.area = "儋州市";
                            break;
                        case 5:
                            shor.area = "五指山市";
                            break;
                        case 6:
                            shor.area = "琼海市";
                            break;
                        case 7:
                            shor.area = "文昌市";
                            break;
                        case 8:
                            shor.area = "万宁市";
                            break;
                        case 9:
                            shor.area = "东方市";
                            break;
                        case 10:
                            shor.area = "定安县";
                            break;
                        case 11:
                            shor.area = "屯昌县";
                            break;
                        case 12:
                            shor.area = "澄迈县";
                            break;
                        case 13:
                            shor.area = "临高县";
                            break;
                        case 14:
                            shor.area = "白沙黎族自治县";
                            break;
                        case 15:
                            shor.area = "昌江黎族自治县";
                            break;
                        case 16:
                            shor.area = "东乐黎族自治县";
                            break;
                        case 17:
                            shor.area = "陵水黎族自治县";
                            break;
                        case 18:
                            shor.area = "保亭黎族苗族自治县";
                            break;
                        case 19:
                            shor.area = "琼中黎族苗族自治县";
                            break;
    
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 17:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.成都市" << endl;
                    cout << "2.自贡市" << endl;
                    cout << "3.攀枝花市" << endl;
                    cout << "4.泸州市" << endl;
                    cout << "5.德阳市" << endl;
                    cout << "6.绵阳市" << endl;
                    cout << "7.广元市" << endl;
                    cout << "8.遂宁市" << endl;
                    cout << "9.内江市" << endl;
                    cout << "10.乐山市" << endl;
                    cout << "11.南充市" << endl;
                    cout << "12.宜宾市" << endl;
                    cout << "13.广安市" << endl;
                    cout << "14.达州市" << endl;
                    cout << "15.巴中市" << endl;
                    cout << "16.雅安市" << endl;
                    cout << "17.眉山市" << endl;
                    cout << "18.资阳市" << endl;
                    cout << "19.阿坝州" << endl;
                    cout << "20.甘孜州" << endl;
                    cout << "21.凉山州" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "成都市";
                            break;
                        case 2:
                            shor.area = "自贡市";
                            break;
                        case 3:
                            shor.area = "攀枝花市";
                            break;
                        case 4:
                            shor.area = "泸州市";
                            break;
                        case 5:
                            shor.area = "德阳市";
                            break;
                        case 6:
                            shor.area = "绵阳市";
                            break;
                        case 7:
                            shor.area = "广元市";
                            break;
                        case 8:
                            shor.area = "遂宁市";
                            break;
                        case 9:
                            shor.area = "内江市";
                            break;
                        case 10:
                            shor.area = "乐山市";
                            break;
                        case 11:
                            shor.area = "南充市";
                            break;
                        case 12:
                            shor.area = "宜宾市";
                            break;
                        case 13:
                            shor.area = "广安市";
                            break;
                        case 14:
                            shor.area = "达州市";
                            break;
                         case 15:
                            shor.area = "巴中市";
                            break;
                        case 16:
                            shor.area = "雅安市";
                            break;
                        case 17:
                            shor.area = "眉山市";
                            break;
                        case 18:
                            shor.area = "资阳市";
                            break;
                        case 19:
                            shor.area = "阿坝州";
                            break;
                        case 20:
                            shor.area = "甘孜州";
                            break;
                        case 21:
                            shor.area = "凉山州";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            
            case 18:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.贵阳市" << endl;
                    cout << "2.六盘水市" << endl;
                    cout << "3.遵义市" << endl;
                    cout << "4.安顺市" << endl;
                    cout << "5.毕节市" << endl;
                    cout << "6.铜仁市" << endl;
                    cout << "7.黔西南州" << endl;
                    cout << "8.黔东南州" << endl;
                    cout << "9.黔南州" << endl;
                    cout << "10.贵安新区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "贵阳市";
                            break;
                         case 2:
                            shor.area = "六盘水市";
                            break;
                         case 3:
                            shor.area = "遵义市";
                            break;
                         case 4:
                            shor.area = "安顺市";
                            break;
                         case 5:
                            shor.area = "毕节市";
                            break;
                         case 6:
                            shor.area = "铜仁市";
                            break;
                         case 7:
                            shor.area = "黔西南州";
                            break;
                         case 8:
                            shor.area = "黔东南州";
                            break;
                         case 9:
                            shor.area = "黔南州";
                            break;
                         case 10:
                            shor.area = "贵安新区";
                            break;
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 19:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.昆明市" << endl;
                    cout << "2.曲靖市" << endl;
                    cout << "3.玉溪市" << endl;
                    cout << "4.保山市" << endl;
                    cout << "5.昭通市" << endl;
                    cout << "6.丽江市" << endl;
                    cout << "7.普洱市" << endl;
                    cout << "8.临沧市" << endl;
                    cout << "9.楚雄彝族自治区" << endl;
                    cout << "10.红河哈尼族彝族自治州" << endl;
                    cout << "11.文山壮族苗族自治州" << endl;
                    cout << "12.西双版纳傣族自治州" << endl;
                    cout << "13.大理白族自治州" << endl;
                    cout << "14.德宏傣族颇族自治州" << endl;
                    cout << "15.怒江傈僳族自治州" << endl;
                    cout << "16.迪庆藏族自治州" << endl;
                    
                    cin >> choice;

                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "昆明市 ";
                            break;
                         case 2:
                            shor.area = "曲靖市 ";
                            break;
                         case 3:
                            shor.area = "玉溪市 ";
                            break;
                         case 4:
                            shor.area = "保山市 ";
                            break;
                         case 5:
                            shor.area = "昭通市";
                            break;
                         case 6:
                            shor.area = "丽江市 ";
                            break;
                         case 7:
                            shor.area = "普洱市 ";
                            break;
                         case 8:
                            shor.area = "临沧市";
                            break;
                         case 9:
                            shor.area = "楚雄彝族自治区 ";
                            break;
                         case 10:
                            shor.area = " 红河哈尼族彝族自治州";
                            break;
                         case 11:
                            shor.area = "文山壮族苗族自治州 ";
                            break;
                         case 12:
                            shor.area = " 西双版纳傣族自治州";
                            break;
                         case 13:
                            shor.area = "大理白族自治州 ";
                            break;
                         case 14:
                            shor.area = "德宏傣族颇族自治州 ";
                            break;
                         case 15:
                            shor.area = "怒江傈僳族自治州";
                            break;
                         case 16:
                            shor.area = "迪庆藏族自治州 ";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 20:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.西安市" << endl;
                    cout << "2.宝鸡市" << endl;
                    cout << "3.咸阳市" << endl;
                    cout << "4.铜川市" << endl;
                    cout << "5.渭南市" << endl;
                    cout << "6.延安市" << endl;
                    cout << "7.榆林市" << endl;
                    cout << "8.汉中市" << endl;
                    cout << "9.安康市" << endl;
                    cout << "10.商洛市" << endl;
                    cout << "11.韩城市" << endl;
                    cout << "12.杨陵区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "西安市 ";
                            break;
                         case 2:
                            shor.area = "宝鸡市 ";
                            break;
                         case 3:
                            shor.area = "咸阳市 ";
                            break;
                         case 4:
                            shor.area = "铜川市 ";
                            break;
                         case 5:
                            shor.area = "渭南市 ";
                            break;
                         case 6:
                            shor.area = "延安市 ";
                            break;
                         case 7:
                            shor.area = "榆林市 ";
                            break;
                         case 8:
                            shor.area = "汉中市 ";
                            break;
                         case 9:
                            shor.area = "安康市 ";
                            break;
                         case 10:
                            shor.area = "商洛市 ";
                            break;
                         case 11:
                            shor.area = "韩成市 ";
                            break;
                         case 12:
                            shor.area = "杨陵区 ";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 21:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.兰州市" << endl;
                    cout << "2.嘉峪关市" << endl;
                    cout << "3.金昌市" << endl;
                    cout << "4.酒泉市" << endl;
                    cout << "5.张掖市" << endl;
                    cout << "6.武威市" << endl;
                    cout << "7.白银市" << endl;
                    cout << "8.天水市" << endl;
                    cout << "9.平凉市" << endl;
                    cout << "10.庆阳市" << endl;
                    cout << "11.定西市" << endl;
                    cout << "12.陇南区" << endl;
                    cout << "13.甘南藏族自治州" << endl;
                    cout << "14.临夏回族自治州" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "兰州市 ";
                            break;
                         case 2:
                            shor.area = "嘉峪关市 ";
                            break;
                         case 3:
                            shor.area = "金昌市 ";
                            break;
                         case 4:
                            shor.area = "酒泉市 ";
                            break;
                         case 5:
                            shor.area = "张掖市 ";
                            break;
                         case 6:
                            shor.area = "武威市 ";
                            break;
                         case 7:
                            shor.area = "白银市 ";
                            break;
                         case 8:
                            shor.area = "天水市 ";
                            break;
                         case 9:
                            shor.area = "平凉市 ";
                            break;
                         case 10:
                            shor.area = "庆阳市 ";
                            break;
                         case 11:
                            shor.area = "定西市 ";
                            break;
                         case 12:
                            shor.area = "陇南区";
                            break;
                         case 13:
                            shor.area = "甘南藏族自治州 ";
                            break;
                         case 14:
                            shor.area = "临夏回族自治州 ";
                            break;

                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 22:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.西宁市" << endl;
                    cout << "2.海东市" << endl;
                    cout << "3.海西蒙古族藏族自治州市" << endl;
                    cout << "4.海南藏族自治州" << endl;
                    cout << "5.海北藏族自治州" << endl;
                    cout << "6.玉树藏族自治州" << endl;
                    cout << "7.果洛藏族自治州" << endl;
                    cout << "8.黄南藏族自治州" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "西宁市 ";
                            break;
                         case 2:
                            shor.area = "海东市 ";
                            break;
                         case 3:
                            shor.area = "海西蒙古族藏族自治州市 ";
                            break;
                         case 4:
                            shor.area = "海南藏族自治州 ";
                            break;
                         case 5:
                            shor.area = "海北藏族自治州";
                            break;
                         case 6:
                            shor.area = "玉树藏族自治州";
                            break;
                         case 7:
                            shor.area = "果洛藏族自治州";
                            break;
                         case 8:
                            shor.area = "黄南藏族自治州";
                            break;

                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 23:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.东城区" << endl;
                    cout << "2.西城区" << endl;
                    cout << "3.朝阳区" << endl;
                    cout << "4.丰台区" << endl;
                    cout << "5.石景山区" << endl;
                    cout << "6.海淀区" << endl;
                    cout << "7.门头沟区" << endl;
                    cout << "8.房山区" << endl;
                    cout << "9.通州区" << endl;
                    cout << "10.顺义区" << endl;
                    cout << "11.昌平区" << endl;
                    cout << "12.大兴区" << endl;
                    cout << "13.怀柔区" << endl;
                    cout << "14.平谷区" << endl;
                    cout << "15.密云区" << endl;
                    cout << "16.延庆区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "东城区 ";
                            break;
                         case 2:
                            shor.area = "西城区 ";
                            break;
                         case 3:
                            shor.area = "朝阳区";
                            break;
                         case 4:
                            shor.area = "丰台区 ";
                            break;
                         case 5:
                            shor.area = "石景山区 ";
                            break;
                         case 6:
                            shor.area = "海淀区";
                            break;
                         case 7:
                            shor.area = "门头沟区 ";
                            break;
                         case 8:
                            shor.area = "房山区 ";
                            break;
                         case 9:
                            shor.area = "通州区";
                            break;
                         case 10:
                            shor.area = "顺义区 ";
                            break;
                         case 11:
                            shor.area = "昌平区";
                            break;
                         case 12:
                            shor.area = "大兴区";
                            break;
                         case 13:
                            shor.area = "怀柔区 ";
                            break;
                         case 14:
                            shor.area = "平谷区";
                            break;
                         case 15:
                            shor.area = "密云区";
                            break;
                         case 16:
                            shor.area = "延庆区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 24:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.和平区" << endl;
                    cout << "2.河东区" << endl;
                    cout << "3.河西区" << endl;
                    cout << "4.南开区" << endl;
                    cout << "5.河北区" << endl;
                    cout << "6.红桥区" << endl;
                    cout << "7.东丽区" << endl;
                    cout << "8.西青区" << endl;
                    cout << "9.津南区" << endl;
                    cout << "10.北辰区" << endl;
                    cout << "11.武清区" << endl;
                    cout << "12.宝坻区" << endl;
                    cout << "13.滨海新区" << endl;
                    cout << "14.宁河区" << endl;
                    cout << "15.静海区" << endl;
                    cout << "16.蓟州区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "和平区";
                            break;
                         case 2:
                            shor.area = "河东区";
                            break;
                         case 3:
                            shor.area = "河西区";
                            break;
                         case 4:
                            shor.area = "南开区 ";
                            break;
                         case 5:
                            shor.area = "河北区";
                            break;
                         case 6:
                            shor.area = "红桥区 ";
                            break;
                         case 7:
                            shor.area = "东丽区 ";
                            break;
                         case 8:
                            shor.area = "西青区";
                            break;
                         case 9:
                            shor.area = "津南区";
                            break;
                         case 10:
                            shor.area = "北辰区 ";
                            break;
                         case 11:
                            shor.area = "武清区";
                            break;
                         case 12:
                            shor.area = "宝坻区";
                            break;
                         case 13:
                            shor.area = "滨海新区";
                            break;
                         case 14:
                            shor.area = "宁河区 ";
                            break;
                         case 15:
                            shor.area = "静海区";
                            break;
                         case 16:
                            shor.area = "蓟州区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 25:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.浦东新区" << endl;
                    cout << "2.黄浦区" << endl;
                    cout << "3.静安区" << endl;
                    cout << "4.徐汇区" << endl;
                    cout << "5.长宁区" << endl;
                    cout << "6.普陀区" << endl;
                    cout << "7.虹口区" << endl;
                    cout << "8.杨浦区" << endl;
                    cout << "9.宝山区" << endl;
                    cout << "10.闵行区" << endl;
                    cout << "11.嘉定区" << endl;
                    cout << "12.金山区" << endl;
                    cout << "13.松江区" << endl;
                    cout << "14.青浦区" << endl;
                    cout << "15.奉贤区" << endl;
                    cout << "16.崇明区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "浦东新区";
                            break;
                         case 2:
                            shor.area = "黄浦区";
                            break;
                         case 3:
                            shor.area = "静安区";
                            break;
                         case 4:
                            shor.area = "徐汇区";
                            break;
                         case 5:
                            shor.area = "长宁区";
                            break;
                         case 6:
                            shor.area = "普陀区";
                            break;
                         case 7:
                            shor.area = "虹口区";
                            break;
                         case 8:
                            shor.area = "杨浦区";
                            break;
                         case 9:
                            shor.area = "宝山区";
                            break;
                         case 10:
                            shor.area = "闵行区";
                            break;
                         case 11:
                            shor.area = "嘉定区";
                            break;
                         case 12:
                            shor.area = "金山区";
                            break;
                         case 13:
                            shor.area = "松江区";
                            break;
                         case 14:
                            shor.area = "青浦区";
                            break;
                         case 15:
                            shor.area = "奉贤区";
                            break;
                         case 16:
                            shor.area = "崇明区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 26:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.万州区" << endl;
                    cout << "2.黔江区" << endl;
                    cout << "3.涪陵区" << endl;
                    cout << "4.渝中区" << endl;
                    cout << "5.大渡口区" << endl;
                    cout << "6.江北区" << endl;
                    cout << "7.沙坪坝区" << endl;
                    cout << "8.九龙坡区" << endl;
                    cout << "9.南岸区" << endl;
                    cout << "10.北碚区" << endl;
                    cout << "11.渝北区" << endl;
                    cout << "12.巴南区" << endl;
                    cout << "13.长寿区" << endl;
                    cout << "14.江津区" << endl;
                    cout << "15.合川区" << endl;
                    cout << "16.永川区" << endl;
                    cout << "17.南川区" << endl;
                    cout << "18.綦江区" << endl;
                    cout << "19.大足区" << endl;
                    cout << "20.璧山区" << endl;
                    cout << "21.铜梁区" << endl;
                    cout << "22.潼南区" << endl;
                    cout << "23.荣昌区" << endl;
                    cout << "24.开州区" << endl;
                    cout << "25.梁平区" << endl;
                    cout << "26.武隆区" << endl;
                    cout << "27.城口县" << endl;
                    cout << "28.丰都县" << endl;
                    cout << "29.垫江县" << endl;
                    cout << "30.忠县" << endl;
                    cout << "31.云阳县" << endl;
                    cout << "32.奉节县" << endl;
                    cout << "33.巫山县" << endl;
                    cout << "34.巫溪县" << endl;
                    cout << "35.石柱土家族自治县" << endl;
                    cout << "36.秀山土家族苗族自治县" << endl;
                    cout << "37.酉阳土家族苗族自治县" << endl;
                    cout << "38.彭水苗族土家族自治县" << endl;
                    cout << "39.两江新区" << endl;
                    cout << "40.万盛经开区" << endl;
                    cout << "41.重庆高新区" << endl;
                    cout << "42.重庆经开区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "万州区";
                            break;
                         case 2:
                            shor.area = "黔江区";
                            break;
                         case 3:
                            shor.area = "涪陵区";
                            break;
                         case 4:
                            shor.area = "渝中区";
                            break;
                         case 5:
                            shor.area = "大渡口区";
                            break;
                         case 6:
                            shor.area = "江北区";
                            break;
                         case 7:
                            shor.area = "沙坪坝区";
                            break;
                         case 8:
                            shor.area = "九龙坡区";
                            break;
                         case 9:
                            shor.area = "南岸区";
                            break;
                         case 10:
                            shor.area = "北碚区";
                            break;
                         case 11:
                            shor.area = "渝北区";
                            break;
                         case 12:
                            shor.area = "巴南区";
                            break;
                         case 13:
                            shor.area = "长寿区";
                            break;
                         case 14:
                            shor.area = "江津区";
                            break;
                         case 15:
                            shor.area = "合川区";
                            break;
                         case 16:
                            shor.area = "永川区";
                            break;
                         case 17:
                            shor.area = "南川区";
                            break;
                         case 18:
                            shor.area = "綦江区";
                            break;
                         case 19:
                            shor.area = "大足区";
                            break;
                         case 20:
                            shor.area = "璧山区";
                            break;
                         case 21:
                            shor.area = "铜梁区";
                            break;
                         case 22:
                            shor.area = "潼南区";
                            break;
                         case 23:
                            shor.area = "荣昌区";
                            break;
                         case 24:
                            shor.area = "开州区";
                            break;
                         case 25:
                            shor.area = "梁平区";
                            break;
                         case 26:
                            shor.area = "武隆区";
                            break;
                         case 27:
                            shor.area = "城口县";
                            break;
                         case 28:
                            shor.area = "丰都县";
                            break;
                         case 29:
                            shor.area = "垫江县";
                            break;
                         case 30:
                            shor.area = "忠县";
                            break;
                         case 31:
                            shor.area = "云阳县";
                            break;
                         case 32:
                            shor.area = "奉节县";
                            break;
                         case 33:
                            shor.area = "巫山县";
                            break;
                         case 34:
                            shor.area = "巫溪县";
                            break;
                         case 35:
                            shor.area = "石柱土家族自治县";
                            break;
                         case 36:
                            shor.area = "秀山土家族苗族自治县";
                            break;
                         case 37:
                            shor.area = "酉阳土家族苗族自治县";
                            break;
                         case 38:
                            shor.area = "彭水苗族土家族自治县";
                            break;
                         case 39:
                            shor.area = "两江新区";
                            break;
                         case 40:
                            shor.area = "万盛经开区";
                            break;
                         case 41:
                            shor.area = "重庆高新区";
                            break;
                         case 42:
                            shor.area = "重庆经开区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 27:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.呼和浩特市" << endl;
                    cout << "2.包头市" << endl;
                    cout << "3.乌海市" << endl;
                    cout << "4.赤峰市" << endl;
                    cout << "5.通辽市" << endl;
                    cout << "6.鄂尔多斯市" << endl;
                    cout << "7.呼伦贝尔市" << endl;
                    cout << "8.巴彦淖尔市" << endl;
                    cout << "9.乌兰察布市" << endl;
                    cout << "10.兴安盟" << endl;
                    cout << "11.锡林郭勒盟" << endl;
                    cout << "12.阿拉善盟" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "呼和浩特市";
                            break;
                         case 2:
                            shor.area = "包头市";
                            break;
                         case 3:
                            shor.area = "乌海市";
                            break;
                         case 4:
                            shor.area = "赤峰市";
                            break;
                         case 5:
                            shor.area = "通辽市";
                            break;
                         case 6:
                            shor.area = "鄂尔多斯市";
                            break;
                         case 7:
                            shor.area = "呼伦贝尔市";
                            break;
                         case 8:
                            shor.area = "巴彦淖尔市";
                            break;
                         case 9:
                            shor.area = "乌兰察布市";
                            break;
                         case 10:
                            shor.area = "兴安盟";
                            break;
                         case 11:
                            shor.area = "锡林郭勒盟";
                            break;
                         case 12:
                            shor.area = "阿拉善盟";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 28:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.乌鲁木齐市" << endl;
                    cout << "2.克拉玛依市" << endl;
                    cout << "3.吐鲁番市" << endl;
                    cout << "4.哈密市" << endl;
                    cout << "5.昌吉回族自治州" << endl;
                    cout << "6.博尔塔拉蒙古自治州" << endl;
                    cout << "7.巴音郭勒楞蒙古自治州" << endl;
                    cout << "8.阿克苏地区" << endl;
                    cout << "9.克孜勒苏柯尔克孜自治州" << endl;
                    cout << "10.喀什地区" << endl;
                    cout << "11.和田地区" << endl;
                    cout << "12.伊犁哈萨克自治州" << endl;
                    cout << "13.塔城地区" << endl;
                    cout << "14.阿勒泰地区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "乌鲁木齐市";
                            break;
                         case 2:
                            shor.area = "克拉玛依市";
                            break;
                         case 3:
                            shor.area = "吐鲁番市";
                            break;
                         case 4:
                            shor.area = "哈密市";
                            break;
                         case 5:
                            shor.area = "昌吉回族自治州";
                            break;
                         case 6:
                            shor.area = "博尔塔拉蒙古自治州";
                            break;
                         case 7:
                            shor.area = "巴音郭勒楞蒙古自治州";
                            break;
                         case 8:
                            shor.area = "阿克苏地区";
                            break;
                         case 9:
                            shor.area = "克孜勒苏柯尔克孜自治州";
                            break;
                         case 10:
                            shor.area = "喀什地区";
                            break;
                         case 11:
                            shor.area = "和田地区";
                            break;
                         case 12:
                            shor.area = "伊犁哈萨克自治州";
                            break;
                         case 13:
                            shor.area = "塔城地区";
                            break;
                         case 14:
                            shor.area = "阿勒泰地区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 29:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.南宁市" << endl;
                    cout << "2.柳州市" << endl;
                    cout << "3.桂林市" << endl;
                    cout << "4.梧州市" << endl;
                    cout << "5.北海市" << endl;
                    cout << "6.防城港市" << endl;
                    cout << "7.钦州市" << endl;
                    cout << "8.贵港市" << endl;
                    cout << "9.玉林市" << endl;
                    cout << "10.百色市" << endl;
                    cout << "11.贺州市" << endl;
                    cout << "12.河池市" << endl;
                    cout << "13.来宾市" << endl;
                    cout << "14.崇左市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "南宁市";
                            break;
                         case 2:
                            shor.area = "柳州市";
                            break;
                         case 3:
                            shor.area = "桂林市";
                            break;
                         case 4:
                            shor.area = "梧州市";
                            break;
                         case 5:
                            shor.area = "北海市";
                            break;
                         case 6:
                            shor.area = "防城港市";
                            break;
                         case 7:
                            shor.area = "钦州市";
                            break;
                         case 8:
                            shor.area = "贵港市";
                            break;
                         case 9:
                            shor.area = "玉林市";
                            break;
                         case 10:
                            shor.area = "百色市";
                            break;
                         case 11:
                            shor.area = "贺州市";
                            break;
                         case 12:
                            shor.area = "河池市";
                            break;
                         case 13:
                            shor.area = "来宾市";
                            break;
                         case 14:
                            shor.area = "崇左市";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 30:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.拉萨市" << endl;
                    cout << "2.日喀则市" << endl;
                    cout << "3.昌都市" << endl;
                    cout << "4.林芝市" << endl;
                    cout << "5.山南市" << endl;
                    cout << "6.那曲市" << endl;
                    cout << "7.阿里地区" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "拉萨市";
                            break;
                         case 2:
                            shor.area = "日喀则市";
                            break;
                         case 3:
                            shor.area = "昌都市";
                            break;
                         case 4:
                            shor.area = "林芝市";
                            break;
                         case 5:
                            shor.area = "山南市";
                            break;
                         case 6:
                            shor.area = "那曲市";
                            break;
                         case 7:
                            shor.area = "阿里地区";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 31:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.银川市" << endl;
                    cout << "2.石嘴山市" << endl;
                    cout << "3.吴忠市" << endl;
                    cout << "4.固原市" << endl;
                    cout << "5.中卫市" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "银川市";
                            break;
                         case 2:
                            shor.area = "石嘴山市";
                            break;
                         case 3:
                            shor.area = "吴忠市";
                            break;
                         case 4:
                            shor.area = "固原市";
                            break;
                         case 5:
                            shor.area = "中卫市";
                            break;


                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 32:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.香港" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "香港";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 33:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.澳门" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "澳门";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            case 34:
            {
                while(1)
                {
                    cout << "0.返回上一级菜单" << endl;
                    cout << "1.台湾" << endl;
                    
                    cin >> choice;
                    switch (choice)
                    {
                        case 0:
                            flag = false;
                            break;
                         case 1:
                            shor.area = "台湾";
                            break;
                            
                        default:
                            cout << "您的输入有误，请重新输入！" << endl;
                            sub_flag = false;
                            break;
                    }
                    if(sub_flag == true)
                    {
                        break;
                    }
                }
                
                break;
            }
            default:
                cout << "您的输入有误，请重新输入！" << endl;
                flag = false;
                break;
        }
        if(flag == true)
        {
            break;
        }
    }
  
}
//生日录入
void pro_management::set_bir(pro & shor)
{
    while(1)
    {
        cout << "请输入博主的生日：" << endl;
        cout << "年：";
        int short_year;
        cin >> short_year;
        //int & w_year = short_year;
        cout << "月：";
        int short_month;
        cin >> short_month;
        //int & w_month = short_month;
        cout << "日：";
        int short_day;
        cin >> short_day;
        //int & w_day = short_day;
        //用date类里的日期检验函数
        if(date().Check_time(short_year, short_month, short_day))
        {
            shor.birthday.year = short_year;
            shor.birthday.month = short_month;
            shor.birthday.day = short_day;
            break;
        }
        else
        {
            cout << "这是一个错误的日期，请重新输入！" << endl;
            cout << "按任意键继续！" << endl;
            char ch;
            cin >> ch;
        }
    }
}
//性别录入
void pro_management::set_sex(pro & shor)
{
    while(1)
    {
        cout << "请选择博主的性别（1.男 2.女）：" << endl;
        int s = 0;
        cin >> s;
        if(s == 1)
        {
            shor.sex = 'M';
            break;
        }
        else if(s == 2)
        {
            shor.sex = 'F';
            break;
        }
        else
        {
            cout << "您的输入有误，请重新输入！" << endl;
            cout << "按任意键继续！" << endl;
            char ch;
            cin >> ch;
        }
    }
}
//菜单函数
void pro_management::menu()
{
    while(1)
    {
        cout << "请选择您想要进行操作：" << endl;
        cout << "0.返回主菜单" << endl;
        cout << "1.添加个人信息" << endl;
        cout << "2.显示个人信息" << endl;
        cout << "3.修改个人信息" << endl;
        cout << "4.删除个人信息" << endl;
        int choose;
        cin >> choose;
        switch(choose)
        {
            case 0:
                return;
            case 1:
                Insert();
                break;
            case 2:
                show_info();
                break;
            case 3:
                Modify();
                break;
            case 4:
                Remove();
                break;
            default:
                cout << "您的输入有误，请重新输入！" << endl;
                cout << "按任意键继续！" << endl;
                char ch;
                cin >> ch;
                break;
        }
    }
    
}
